#ifndef STACK_H
#define STACK_H
/* stack.h
 *  A LIFO data structure.
 */
 #include <stdio.h>
 #include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>

 typedef struct cstkentry { 
	void* data;
	struct cstkentry* next; 
 } sentry; 

 typedef struct cstk {
	sentry* entries;                          /* Pointer to object list  */
	int    cstksize;                          /* Current number of elems */
 } *stack;

 stack stack_init(void);
 void  stack_push(stack s, void* value, size_t vsz);
 void* stack_pop(stack s);
 void  stack_destroy(stack s);
 void  stack_print(stack s);
#endif
